package handConsistentHash;

/**
 * @author 03010570
 * @date 2020/07/08
 * describe:    PhysicalNode 物理节点
 * <p>
 * 三个属性：
 * 1、  域名  domain
 * 2、  ip    ip
 * 3、  端口  port
 * <p>
 * 方法：
 * 1、toString 重写
 */
public class PNode {

    private String domain;
    private String ip;
    private Integer port;

    public PNode(String domain, String ip, Integer port) {
        this.domain = domain;
        this.ip = ip;
        this.port = port;
    }

    public PNode() {
    }

    @Override
    public String toString() {
        return domain + ":" + ip + ":" + port;
    }

    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }
}
